<?php

class IndexController extends Base_Controller
{

    public function init()
    {
        /* Initialize action controller here */
    	parent::init();
    }

    public function indexAction()
    {
      $sysInfoService = Application_Model_SysInfoService::getInstance();	
	  $config = Zend_Registry::get("config");		
	  $appVersion = $config->get("app")->get("version");
	  $dbVersion = $sysInfoService->getSysInfoByKey("DB_VERSION");
	  if ($appVersion != $dbVersion) {
		//视图变量赋值  
		$this->view->assign(array('message'=>'数据库版本不匹配，请升级数据库！'));
	  }
	  //视图变量赋值  
	  $this->view->assign(array('appVersion'=>$appVersion,'dbVersion'=>$dbVersion));
    }
    
}

